package API;

import java.util.HashMap;
import java.util.Map;

import static Util.HttpTool.sendGet;
import static Util.SignTool.get14Timestamp;
import static Util.SignTool.getMD5;

/**
 * Ocr查询接口
 */
public class OcrQueryApi {
    public static void main(String[] args) {



        String agent_id = "";
        String agent_bill_id = "";
        String time_stamp = get14Timestamp();

        String Key = "";

        String sign = getMD5("agent_id="+agent_id+"&agent_bill_id="+agent_bill_id+"&time_stamp="+time_stamp+"|||" + Key );



        Map<String, String> map = new HashMap<>();
        map.put("agent_id", agent_id);
        map.put("agent_bill_id", agent_bill_id);
        map.put("time_stamp", time_stamp);
        map.put("sign", sign);

        String res = sendGet("http://Service.800j.com/Certify/OcrCertifyQuery.aspx", map);
        System.out.println(res);
    }
}
